import Login from "../views/login";
import Register from "../views/register";
import Main from "../views/main";

const routes = [
    {
        path: "/login",
        component: Login
    },
    {
        path: "/register",
        component: Register
    },
    {
        path: "/",
        component: Main,
        children: [
            {
                path: "",
                redirect: "dashboard"
            },
            {
                path: "dashboard",
                component: () => import("../views/main/pages/dashboard")
            },
            {
                path: "users",
                component: () => import("../views/main/pages/users")
            },
            {
                path: "notices",
                component: () => import("../views/main/pages/notices")
            },
            {
                path: "wallpapers",
                component: () => import("../views/main/pages/wallpapers")
            },
            {
                path: "categorys",
                component: () => import("../views/main/pages/categorys")
            }
        ]
    },
    {
        path: "/:pathMatch(.*)*",
        redirect: "/login"
    }
];

export default routes;
